package com.sx.pipeline.repos

import com.sx.mvvmlibs.base.BaseModel
import com.sx.pipeline.app.config.BaseEntity
import com.sx.pipeline.repos.http.IHttpSource
import com.sx.pipeline.repos.http.req.AddAdministrativeDTO
import com.sx.pipeline.repos.http.req.AddBankDTO
import com.sx.pipeline.repos.http.req.AddInquiryDTO
import com.sx.pipeline.repos.http.req.AddQuotedPriceDTO
import com.sx.pipeline.repos.http.req.AuditTaskDTO
import com.sx.pipeline.repos.http.req.BindPhoneDTO
import com.sx.pipeline.repos.http.req.CreateGroupDTO
import com.sx.pipeline.repos.http.req.DealTaskDTO
import com.sx.pipeline.repos.http.req.DistrictBorderDTO
import com.sx.pipeline.repos.http.req.EquipmentAddDTO
import com.sx.pipeline.repos.http.req.GoodsAddDTO
import com.sx.pipeline.repos.http.req.JoinBusinessDTO
import com.sx.pipeline.repos.http.req.LoginDTO
import com.sx.pipeline.repos.http.req.MessageDTO
import com.sx.pipeline.repos.http.req.ModifyPwdDTO
import com.sx.pipeline.repos.http.req.RegisterDTO
import com.sx.pipeline.repos.http.req.ReleaseNeedsAddDTO
import com.sx.pipeline.repos.http.req.ReqGroupReportDTO
import com.sx.pipeline.repos.http.req.ReqUserReportDTO
import com.sx.pipeline.repos.http.req.ResetUserDTO
import com.sx.pipeline.repos.http.req.ServiceAddDTO
import com.sx.pipeline.repos.http.req.SupplyOrderAddDTO
import com.sx.pipeline.repos.http.req.TaskAddDTO
import com.sx.pipeline.repos.http.req.TaskCreateGroupDTO
import com.sx.pipeline.repos.http.req.TaskDelayDTO
import com.sx.pipeline.repos.http.req.TaskEvaluateDTO
import com.sx.pipeline.repos.http.req.WithdrawDTO
import com.sx.pipeline.repos.http.res.AdvertiseDetailVO
import com.sx.pipeline.repos.http.res.AdvertiseVO
import com.sx.pipeline.repos.http.res.AgreementVO
import com.sx.pipeline.repos.http.res.AliPayResponse
import com.sx.pipeline.repos.http.res.BalanceRecordVO
import com.sx.pipeline.repos.http.res.BankListVO
import com.sx.pipeline.repos.http.res.BannerVO
import com.sx.pipeline.repos.http.res.CommonApplyListVO
import com.sx.pipeline.repos.http.res.ContactUserVo
import com.sx.pipeline.repos.http.res.DeviceInfoVo
import com.sx.pipeline.repos.http.res.ExamineInfoVo
import com.sx.pipeline.repos.http.res.ExamineOperatorVo
import com.sx.pipeline.repos.http.res.ExamineRecordVo
import com.sx.pipeline.repos.http.res.GoodsInfoVo
import com.sx.pipeline.repos.http.res.GroupDetailVo
import com.sx.pipeline.repos.http.res.IdentityVO
import com.sx.pipeline.repos.http.res.InformationVO
import com.sx.pipeline.repos.http.res.Ipage
import com.sx.pipeline.repos.http.res.LoginVO
import com.sx.pipeline.repos.http.res.MessageDetailVo
import com.sx.pipeline.repos.http.res.MessageListVo
import com.sx.pipeline.repos.http.res.MessageTypeVo
import com.sx.pipeline.repos.http.res.MyUnitListVO
import com.sx.pipeline.repos.http.res.NeedsQuotedVO
import com.sx.pipeline.repos.http.res.ProvincesVO
import com.sx.pipeline.repos.http.res.RechargeInfoVO
import com.sx.pipeline.repos.http.res.ReleaseNeedsVO
import com.sx.pipeline.repos.http.res.ReleaseSupplyVo
import com.sx.pipeline.repos.http.res.ReleaseTaskVo
import com.sx.pipeline.repos.http.res.RongGroupVO
import com.sx.pipeline.repos.http.res.RyUserVo
import com.sx.pipeline.repos.http.res.ServiceTitleVO
import com.sx.pipeline.repos.http.res.StudyCenterVO
import com.sx.pipeline.repos.http.res.SupplyDetailVo
import com.sx.pipeline.repos.http.res.TaskConfigVo
import com.sx.pipeline.repos.http.res.TaskContactVo
import com.sx.pipeline.repos.http.res.TaskDetailVo
import com.sx.pipeline.repos.http.res.TaskEvaluateVO
import com.sx.pipeline.repos.http.res.TaskGroupVO
import com.sx.pipeline.repos.http.res.TaskStatisticsVO
import com.sx.pipeline.repos.http.res.TerritoryVO
import com.sx.pipeline.repos.http.res.UnitNameVO
import com.sx.pipeline.repos.http.res.UnitTypeVO
import com.sx.pipeline.repos.http.res.UserInfoVO
import com.sx.pipeline.repos.http.res.UserUnitVo
import com.sx.pipeline.repos.http.res.VersionUpdateVO
import com.sx.pipeline.repos.http.res.ViewInquiryVo
import com.sx.pipeline.repos.http.res.WechatResponse
import com.sx.pipeline.repos.http.res.WithdrawRecordVO
import com.sx.pipeline.repos.local.ILocalSource
import com.sx.pipeline.repos.local.db.table.PipeFileBeanDO
import com.sx.pipeline.utils.kml.FileParseBean
import com.sx.pipeline.view.treeview2.OrganizeDeptRes
import io.reactivex.rxjava3.core.Observable
import io.reactivex.rxjava3.core.Single
import java.io.File
import java.io.Serializable

/**
 * @Author: YY
 * @Date: 2022/4/5
 * @Description: 数据仓库
 */
class AppRepos(
    private val localData: ILocalSource,
    private val httpData: IHttpSource,
) : BaseModel(), ILocalSource, IHttpSource {

    /*********************** 本地接口 *************************/

    override fun setToken(token: String) {
        localData.setToken(token)
    }

    override fun getToken(): String? {
        return localData.getToken()
    }

    override fun clearToken() {
        return localData.clearToken()
    }

    override fun setNoticeUnreadNum(value: Int) {
        return localData.setNoticeUnreadNum(value)
    }

    override fun getNoticeUnreadNum(): Int {
        return localData.getNoticeUnreadNum()
    }

    override fun saveUserData(userInfo: UserInfoVO) {
        return localData.saveUserData(userInfo)
    }

    override fun getUserData(): UserInfoVO? {
        return localData.getUserData()
    }

    override fun saveIdentityType(type: Int) {
        return localData.saveIdentityType(type)
    }

    override fun getIdentityType(): Int {
        return localData.getIdentityType()!!
    }

    override fun setPermission(value: Boolean) {
        return localData.setPermission(value)
    }

    override fun setPayWord(isset: Boolean) {
        return localData.setPayWord(isset)
    }

    override fun getPayWord(): Boolean? {
        return localData.getPayWord()
    }

    override fun <T : Serializable> saveCacheData(obj: T?) {
        return localData.saveCacheData(obj)
    }

    override fun <T : Serializable> getCacheData(key: String): T? {
        return localData.getCacheData(key)
    }

    override fun <T : Serializable> saveCacheListData(list: List<T>) {
        localData.saveCacheListData(list)
    }

    override fun <T : Serializable> getCacheListData(key: String): List<T>? {
        return localData.getCacheListData(key)
    }

    override fun saveFileBean(fileBeanDO: PipeFileBeanDO): Single<Long> {
        return localData.saveFileBean(fileBeanDO)
    }

    override fun savaFileBeanAll(fileBeanDOList: List<PipeFileBeanDO>): Single<List<Long>> {
        return localData.savaFileBeanAll(fileBeanDOList)
    }

    override fun getFileBeanAll(fileType: Int): Single<List<PipeFileBeanDO>> {
        return localData.getFileBeanAll(fileType)
    }

    override fun deleteFileBean(fileBeanDO: PipeFileBeanDO): Single<Int> {
        return localData.deleteFileBean(fileBeanDO)
    }


    /*********************** Http接口 *************************/

    override fun getProvinces(): Observable<BaseEntity<List<ProvincesVO>>> {
        return httpData.getProvinces()
    }

    override fun queryUnitType(identityID:Int ?): Observable<BaseEntity<List<UnitTypeVO>>> {
        return httpData.queryUnitType(identityID)
    }

    override fun getUnitNameList(
        name: String?,
        areaId: Int,
        typeAttribute: String?,
        unitTypeId: String?,
        identity: Int,
        isPage: Boolean,
        page: Int,
        limit: Int
    ): Observable<BaseEntity<Ipage<UnitNameVO>>> {
        return httpData.getUnitNameList(
            name,
            areaId,
            typeAttribute,
            unitTypeId,
            identity,
            isPage,
            page,
            limit
        )
    }

    override fun getRegUnitNameList(
        name: String?,
        areaId: Int,
        typeAttribute: String?,
        unitTypeId: String?,
        identity: Int,
        isPage: Boolean,
        page: Int,
        limit: Int
    ): Observable<BaseEntity<Ipage<UnitNameVO>>> {
        return httpData.getRegUnitNameList(
            name,
            areaId,
            typeAttribute,
            unitTypeId,
            identity,
            isPage,
            page,
            limit
        )
    }


    override fun sendSmsCode(phone: String, type: Int?): Observable<BaseEntity<Boolean>> {
        return httpData.sendSmsCode(phone, type)
    }

    override fun getAgreement(id: Long): Observable<BaseEntity<AgreementVO>> {
        return httpData.getAgreement(id)
    }

    override fun register(dto: RegisterDTO): Observable<BaseEntity<Boolean>> {
        return httpData.register(dto)
    }

    override fun login(dto: LoginDTO): Observable<BaseEntity<LoginVO>> {
        return httpData.login(dto)
    }

    override fun cancelAccount(): Observable<BaseEntity<Any>> {
        return httpData.cancelAccount()
    }

    override fun bindPhone(dto: BindPhoneDTO): Observable<BaseEntity<LoginVO>> {
        return httpData.bindPhone(dto)
    }

    override fun modifyPassword(dto: ModifyPwdDTO): Observable<BaseEntity<Boolean>> {
        return httpData.modifyPassword(dto)
    }

    override fun getUserInfo(): Observable<BaseEntity<UserInfoVO>> {
        return httpData.getUserInfo()
    }

    override fun getNoticeTypeList(): Observable<BaseEntity<List<MessageTypeVo>>> {
        return httpData.getNoticeTypeList()
    }

    override fun getNoticeByCode(
        code: Int,
        page: Int
    ): Observable<BaseEntity<Ipage<MessageListVo>>> {
        return httpData.getNoticeByCode(code, page)
    }

    override fun getNoticeDetail(dto: MessageDTO): Observable<BaseEntity<MessageDetailVo>> {
        return httpData.getNoticeDetail(dto)
    }

    override fun getTask(): Observable<BaseEntity<TaskConfigVo>> {
        return httpData.getTask()
    }

    override fun getContacts(): Observable<BaseEntity<List<TaskContactVo>>> {
        return httpData.getContacts()
    }

    override fun getAllHaveRead(): Observable<BaseEntity<Boolean>> {
        return httpData.getAllHaveRead()
    }

    override fun getTaskAdd(dto: TaskAddDTO): Observable<BaseEntity<TaskGroupVO>> {
        return httpData.getTaskAdd(dto)
    }

    override fun getNeed(): Observable<BaseEntity<TaskConfigVo>> {
        return httpData.getNeed()
    }

    override fun uploadImage(file: File): Observable<BaseEntity<String>> {
        return httpData.uploadImage(file)
    }

    override fun putTaskList(status: Int, page: Int): Observable<BaseEntity<Ipage<ReleaseTaskVo>>> {
        return httpData.putTaskList(status, page)
    }

    override fun getCancelTask(id: Int): Observable<BaseEntity<Any>> {
        return httpData.getCancelTask(id)
    }

    override fun getEndTask(id: Int): Observable<BaseEntity<Any>> {
        return httpData.getEndTask(id)
    }

    override fun getRemoveTask(id: Int): Observable<BaseEntity<Any>> {
        return httpData.getRemoveTask(id)
    }

    override fun takePartTaskList(
        status: Int,
        page: Int
    ): Observable<BaseEntity<Ipage<ReleaseTaskVo>>> {
        return httpData.takePartTaskList(status, page)
    }

    override fun auditTaskList(
        status: Int,
        page: Int
    ): Observable<BaseEntity<Ipage<ReleaseTaskVo>>> {
        return httpData.auditTaskList(status, page)
    }

    override fun getTaskAudit(dto: AuditTaskDTO): Observable<BaseEntity<TaskGroupVO>> {
        return httpData.getTaskAudit(dto)
    }

    override fun dealWithTask(dto: DealTaskDTO): Observable<BaseEntity<Any>> {
        return httpData.dealWithTask(dto)
    }

    override fun getUserUnit(): Observable<BaseEntity<UserUnitVo>> {
        return httpData.getUserUnit()
    }

    override fun getTaskDetail(id: Int): Observable<BaseEntity<TaskDetailVo>> {
        return httpData.getTaskDetail(id)
    }

    override fun getTaskDelay(dto: TaskDelayDTO): Observable<BaseEntity<Any>> {
        return httpData.getTaskDelay(dto)
    }

    override fun getSupply(): Observable<BaseEntity<TaskConfigVo>> {
        return httpData.getSupply()
    }

    override fun equipmentAdd(dto: EquipmentAddDTO): Observable<BaseEntity<Any>> {
        return httpData.equipmentAdd(dto)
    }

    override fun getEquipmentList(
        key: String,
        page: Int
    ): Observable<BaseEntity<Ipage<DeviceInfoVo>>> {
        return httpData.getEquipmentList(key, page)
    }

    override fun getPmsServiceList(
        key: String,
        page: Int,
        limit: Int
    ): Observable<BaseEntity<Ipage<ServiceAddDTO>>> {
        return httpData.getPmsServiceList(key, page)
    }

    override fun getDeviceDetail(id: Int): Observable<BaseEntity<DeviceInfoVo>> {
        return httpData.getDeviceDetail(id)
    }

    override fun equipmentEdit(dto: EquipmentAddDTO): Observable<BaseEntity<Any>> {
        return httpData.equipmentEdit(dto)
    }

    override fun getEquipmentDelete(id: Int): Observable<BaseEntity<Any>> {
        return httpData.getEquipmentDelete(id)
    }

    override fun supplyOrderAdd(dto: SupplyOrderAddDTO): Observable<BaseEntity<Any>> {
        return httpData.supplyOrderAdd(dto)
    }

    override fun pushSupplyPage(
        status: Int,
        page: Int
    ): Observable<BaseEntity<Ipage<ReleaseSupplyVo>>> {
        return httpData.pushSupplyPage(status, page)
    }

    override fun getProduct(): Observable<BaseEntity<TaskConfigVo>> {
        return httpData.getProduct()
    }

    override fun productAdd(dto: GoodsAddDTO): Observable<BaseEntity<Any>> {
        return httpData.productAdd(dto)
    }

    override fun getProductList(
        key: String,
        page: Int
    ): Observable<BaseEntity<Ipage<GoodsInfoVo>>> {
        return httpData.getProductList(key, page)
    }

    override fun productEdit(dto: GoodsAddDTO): Observable<BaseEntity<Any>> {
        return httpData.productEdit(dto)
    }

    override fun deleteProduct(id: Int): Observable<BaseEntity<Any>> {
        return httpData.deleteProduct(id)
    }

    override fun getGoodsDetail(id: Int): Observable<BaseEntity<GoodsInfoVo>> {
        return httpData.getGoodsDetail(id)
    }

    override fun auditSupplyList(
        status: Int,
        page: Int
    ): Observable<BaseEntity<Ipage<ReleaseSupplyVo>>> {
        return httpData.auditSupplyList(status, page)
    }

    override fun getBannerList(): Observable<BaseEntity<List<BannerVO>>> {
        return httpData.getBannerList()
    }

    override fun getInformation(): Observable<BaseEntity<InformationVO>> {
        return httpData.getInformation()
    }

    override fun getModuleList(): Observable<BaseEntity<List<CommonApplyListVO>>> {
        return httpData.getModuleList()
    }

    override fun getSupplyAudit(dto: AuditTaskDTO): Observable<BaseEntity<Any>> {
        return httpData.getSupplyAudit(dto)
    }

    override fun getSupplyOrderDetail(id: Int): Observable<BaseEntity<SupplyDetailVo>> {
        return httpData.getSupplyOrderDetail(id)
    }

    override fun takePartSupplyList(
        key: String,
        page: Int,
        isPage: Boolean,
        limit: Int,
    ): Observable<BaseEntity<Ipage<ReleaseSupplyVo>>> {
        return httpData.takePartSupplyList(key, page, isPage, limit)
    }


    override fun addInquiry(dto: AddInquiryDTO): Observable<BaseEntity<Any>> {
        return httpData.addInquiry(dto)
    }

    override fun getInquiryList(orderId: Int): Observable<BaseEntity<List<ViewInquiryVo>>> {
        return httpData.getInquiryList(orderId)
    }

    override fun cancelSupplyOrder(id: Int): Observable<BaseEntity<Any>> {
        return httpData.cancelSupplyOrder(id)
    }

    override fun deleteSupplyOrder(id: Int): Observable<BaseEntity<Any>> {
        return httpData.deleteSupplyOrder(id)
    }

    override fun cancelNeedOrder(id: Int): Observable<BaseEntity<Any>> {
        return httpData.cancelNeedOrder(id)
    }

    override fun addNeedOrder(dto: ReleaseNeedsAddDTO): Observable<BaseEntity<Int>> {
        return httpData.addNeedOrder(dto)
    }

    override fun operationPushNeedPage(
        status: Int,
        page: Int
    ): Observable<BaseEntity<Ipage<ReleaseNeedsVO>>> {
        return httpData.operationPushNeedPage(status, page)
    }

    override fun deleteNeedOrder(id: Int): Observable<BaseEntity<Any>> {
        return httpData.deleteNeedOrder(id)
    }

    override fun addConstructionNeedOrder(dto: ReleaseNeedsAddDTO): Observable<BaseEntity<Any>> {
        return httpData.addConstructionNeedOrder(dto)
    }

    override fun editConstructionNeedOrder(dto: ReleaseNeedsAddDTO): Observable<BaseEntity<Any>> {
        return httpData.editConstructionNeedOrder(dto)
    }

    override fun takePartNeedPage(
        key: String,
        page: Int,
        isPage: Boolean,
        limit: Int,
    ): Observable<BaseEntity<Ipage<ReleaseNeedsVO>>> {
        return httpData.takePartNeedPage(key, page, isPage, limit)
    }


    override fun pushNeedPageList(
        status: Int,
        page: Int
    ): Observable<BaseEntity<Ipage<ReleaseNeedsVO>>> {
        return httpData.pushNeedPageList(status, page)
    }

    override fun auditNeedPage(
        status: Int,
        page: Int
    ): Observable<BaseEntity<Ipage<ReleaseNeedsVO>>> {
        return httpData.auditNeedPage(status, page)
    }

    override fun getNeedOrderAudit(dto: AuditTaskDTO): Observable<BaseEntity<Any>> {
        return httpData.getNeedOrderAudit(dto)
    }

    override fun getNeedOrderDetail(id: Int): Observable<BaseEntity<ReleaseNeedsVO>> {
        return httpData.getNeedOrderDetail(id)
    }

    override fun applyIdentity(identity: String): Observable<BaseEntity<Any>> {
        return httpData.applyIdentity(identity)
    }

    override fun getSwitchUnitList(): Observable<BaseEntity<List<MyUnitListVO>>> {
        return httpData.getSwitchUnitList()
    }

    override fun switchUnitIdentity(
        identity: String,
        unitId: Int
    ): Observable<BaseEntity<IdentityVO>> {
        return httpData.switchUnitIdentity(identity, unitId)
    }

    override fun joinBusiness(dto: JoinBusinessDTO): Observable<BaseEntity<Any>> {
        return httpData.joinBusiness(dto)
    }


    override fun getTaskStatistics(
        taskType: Int,
        timeType: Int
    ): Observable<BaseEntity<HashMap<Int, TaskStatisticsVO>>> {
        return httpData.getTaskStatistics(taskType, timeType)
    }

    override fun getUndoneTask(
        taskType: Int,
        timeType: Int,
        type: Int,
        isPage: Boolean,
        page: Int,
        limit: Int,
    ): Observable<BaseEntity<Ipage<ReleaseTaskVo>>> {
        return httpData.getUndoneTask(taskType, timeType, type, isPage, page, limit)
    }

    override fun getLearningStudy(
        isPage: Boolean,
        page: Int,
        limit: Int
    ): Observable<BaseEntity<Ipage<StudyCenterVO>>> {
        return httpData.getLearningStudy(isPage, page, limit)
    }

    override fun updateUser(dto: ResetUserDTO): Observable<BaseEntity<Any>> {
        return httpData.updateUser(dto)
    }

    override fun getAdvertiseList(
        isPage: Boolean,
        page: Int,
        limit: Int
    ): Observable<BaseEntity<Ipage<AdvertiseVO>>> {
        return httpData.getAdvertiseList(isPage, page, limit)
    }

    override fun addQuotedPrice(dto: AddQuotedPriceDTO): Observable<BaseEntity<Any>> {
        return httpData.addQuotedPrice(dto)
    }

    override fun getQuotedPrice(id: Int): Observable<BaseEntity<List<NeedsQuotedVO>>> {
        return httpData.getQuotedPrice(id)
    }

    override fun addTaskEvaluate(dto: List<TaskEvaluateDTO>): Observable<BaseEntity<Any>> {
        return httpData.addTaskEvaluate(dto)
    }

    override fun getEvaluate(id: Int): Observable<BaseEntity<List<TaskEvaluateVO>>> {
        return httpData.getEvaluate(id)
    }

    override fun getServiceTitle(): Observable<BaseEntity<List<ServiceTitleVO>>> {
        return httpData.getServiceTitle()
    }

    override fun addServiceDevice(dto: ServiceAddDTO): Observable<BaseEntity<Any>> {
        return httpData.addServiceDevice(dto)
    }

    override fun editServiceDevice(dto: ServiceAddDTO): Observable<BaseEntity<Any>> {
        return httpData.editServiceDevice(dto)
    }

    override fun getServiceDeviceDetail(id: Int): Observable<BaseEntity<ServiceAddDTO>> {
        return httpData.getServiceDeviceDetail(id)
    }

    override fun getServiceDelete(id: Int): Observable<BaseEntity<Any>> {
        return httpData.getServiceDelete(id)
    }

    override fun addFeedback(content: String): Observable<BaseEntity<Any>> {
        return httpData.addFeedback(content)
    }

    override fun getAppVersion(): Observable<BaseEntity<VersionUpdateVO>> {
        return httpData.getAppVersion()
    }

    override fun getAdvertisingDetail(
        unitId: Int,
        page: Int
    ): Observable<BaseEntity<AdvertiseDetailVO>> {
        return httpData.getAdvertisingDetail(unitId, page)
    }

    override fun getSupplyPrice(
        serverId: Int,
        startTime: String,
        endTime: String
    ): Observable<BaseEntity<Double>> {
        return httpData.getSupplyPrice(serverId, startTime, endTime)
    }

    override fun addBankCard(dto: AddBankDTO): Observable<BaseEntity<Any>> {
        return httpData.addBankCard(dto)
    }

    override fun getBankCardList(
        page: Int,
        limit: Int
    ): Observable<BaseEntity<Ipage<BankListVO>>> {
        return httpData.getBankCardList(page, limit)
    }

    override fun deleteBank(id: Int): Observable<BaseEntity<Any>> {
        return httpData.deleteBank(id)
    }

    override fun getWalletBillList(
        income: String,
        page: Int,
        limit: Int
    ): Observable<BaseEntity<Ipage<BalanceRecordVO>>> {
        return httpData.getWalletBillList(income, page, limit)
    }

    override fun getWithdraw(dto: WithdrawDTO): Observable<BaseEntity<Any>> {
        return httpData.getWithdraw(dto)
    }

    override fun findWithdrawByPage(
        status: Int,
        page: Int,
        limit: Int
    ): Observable<BaseEntity<Ipage<WithdrawRecordVO>>> {
        return httpData.findWithdrawByPage(status, page, limit)
    }

    override fun getUnitIdentity(): Observable<BaseEntity<List<IdentityVO>>> {
        return httpData.getUnitIdentity()
    }

    override fun getNeedPrice(): Observable<BaseEntity<Double>> {
        return httpData.getNeedPrice()
    }

    override fun getRechargeList(): Observable<BaseEntity<List<RechargeInfoVO>>> {
        return httpData.getRechargeList()
    }

    override fun sumitWxRecharge(id: Int): Observable<BaseEntity<WechatResponse>> {
        return httpData.sumitWxRecharge(id)
    }

    override fun getAdvertisingIntro(id: Int): Observable<BaseEntity<AgreementVO>> {
        return httpData.getAdvertisingIntro(id)
    }

    override fun getRongContact(name: String): Observable<BaseEntity<List<ContactUserVo>>> {
        return httpData.getRongContact(name)
    }

    override fun getRongContact(
        groupId: String,
        userName: String
    ): Observable<BaseEntity<List<ContactUserVo>>> {
        return httpData.getRongContact(groupId, userName)
    }

    override fun getRyPersonalInfo(id: Int): Observable<BaseEntity<RyUserVo>> {
        return httpData.getRyPersonalInfo(id)
    }

    override fun getRongOrganize(): Observable<BaseEntity<List<OrganizeDeptRes>>> {
        return httpData.getRongOrganize()
    }

    override fun getCreateGroup(dto: CreateGroupDTO): Observable<BaseEntity<Any>> {
        return httpData.getCreateGroup(dto)
    }

    override fun getTaskCreateGroup(dto: TaskCreateGroupDTO): Observable<BaseEntity<Any>> {
        return httpData.getTaskCreateGroup(dto)
    }

    override fun getRongGroupList(): Observable<BaseEntity<List<RongGroupVO>>> {
        return httpData.getRongGroupList()
    }

    override fun getRongAllContact(): Observable<BaseEntity<List<ContactUserVo>>> {
        return httpData.getRongAllContact()
    }

    /**************************************** 地图模块 ******************************************/

    override fun addTerritory(dto: FileParseBean): Observable<BaseEntity<Any>> {
        return httpData.addTerritory(dto)
    }

    override fun getTerritoryList(
        type: Int,
        page: Int,
        limit: Int,
        isPage: Boolean
    ): Observable<BaseEntity<Ipage<TerritoryVO>>> {
        return httpData.getTerritoryList(type, page, limit, isPage)
    }

    override fun deleteTerritory(ids: Long): Observable<BaseEntity<Any>> {
        return httpData.deleteTerritory(ids)
    }

    override fun addDistrictBorder(dto: DistrictBorderDTO): Observable<BaseEntity<Any>> {
        return httpData.addDistrictBorder(dto)
    }

    override fun getDistrictBorderList(
        page: Int,
        limit: Int,
        isPage: Boolean
    ): Observable<BaseEntity<Ipage<DistrictBorderDTO>>> {
        return httpData.getDistrictBorderList(page, limit, isPage)
    }

    override fun deleteDistrictBorder(ids: Long): Observable<BaseEntity<Any>> {
        return httpData.deleteDistrictBorder(ids)
    }

    override fun getInquiryPrice(): Observable<BaseEntity<Double>> {
        return httpData.getInquiryPrice()
    }

    override fun getNeedQuote(): Observable<BaseEntity<Double>> {
        return httpData.getNeedQuote()
    }

    override fun requestJoinGroup(id: Int): Observable<BaseEntity<Any>> {
        return httpData.requestJoinGroup(id)
    }

    override fun addAdministrative(dto: AddAdministrativeDTO): Observable<BaseEntity<Any>> {
        return httpData.addAdministrative(dto)
    }

    override fun getAppServiceId(): Observable<BaseEntity<ContactUserVo>> {
        return httpData.getAppServiceId()
    }

    override fun getExamineOperatorList(
        status: Int,
        page: Int,
        limit: Int
    ): Observable<BaseEntity<Ipage<ExamineOperatorVo>>> {
        return httpData.getExamineOperatorList(status, page, limit)
    }

    override fun getExamineRecordList(
        status: Int,
        page: Int,
        limit: Int
    ): Observable<BaseEntity<Ipage<ExamineRecordVo>>> {
        return httpData.getExamineRecordList(status, page, limit)
    }

    override fun audit(id: Int, status: Int, remark: String?): Observable<BaseEntity<Any>> {
        return httpData.audit(id, status, remark)
    }

    override fun applyInfo(id: String): Observable<BaseEntity<ExamineInfoVo>> {
        return httpData.applyInfo(id)
    }

    override fun groupListInfo(id: String): Observable<BaseEntity<GroupDetailVo>> {
        return httpData.groupListInfo(id)
    }

    override fun exitGroup(id: Int): Observable<BaseEntity<Any>> {
        return httpData.exitGroup(id)
    }

    override fun addGroup(groupId: String, userIds: String): Observable<BaseEntity<Any>> {
        return httpData.addGroup(groupId, userIds)
    }

    override fun quitGroup(groupId: String, userIds: String): Observable<BaseEntity<Any>> {
        return httpData.quitGroup(groupId, userIds)
    }

    override fun cleanGroup(groupId: Int): Observable<BaseEntity<Any>> {
        return httpData.cleanGroup(groupId)
    }

    override fun groupReport(dto: ReqGroupReportDTO): Observable<BaseEntity<Any>> {
        return httpData.groupReport(dto)
    }

    override fun userReport(dto: ReqUserReportDTO): Observable<BaseEntity<Any>> {
        return httpData.userReport(dto)
    }

    override fun submitAliPayRecharge(rechargeId: Int): Observable<BaseEntity<String>> {
        return httpData.submitAliPayRecharge(rechargeId)
    }

    fun report(type: Int,content: String,id: String,imageUrl: String):Observable<BaseEntity<Any>> {
        if(type==0){
            return groupReport(ReqGroupReportDTO(content,id,imageUrl))
        }else{
            return userReport(ReqUserReportDTO(content,id,imageUrl))
        }
    }
}